<template>
  <div>
    <div>客户输入的搜索结果: {{ searchVal }}</div>
    <div>账号：{{ username }}</div>
    <div>密码：{{ password }}</div>
    <!-- v-model作用在html元素时 -->
    <!-- <input type="text" :value="searchVal" @input="searchVal = (<HTMLInputElement>$event.target).value"> -->
    <myInput v-model="searchVal" v-model:zhanghao="username" v-model:mima="password" />
    <!-- <myInput :modelValue="searchVal" @update:modelValue="searchVal = $event" /> -->
  </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import myInput from "./myInput.vue"

let searchVal = ref("")
let username = ref('')
let password = ref('')
</script>

<style lang="scss" scoped>

</style>